Repository navigation
build: apply the tccmacho page_count patch after checkout (vlang/v#29744) - #110
Merged
JalonSolov merged 2 commits intoOct 27, 2026
Conversation
) PR #109 added patches/tccmacho-page-count-filesize.diff but nothing applied it, so the bundle built from TCC 85ba3ae8 was unchanged. Apply the patch from the V repo's copy after the TCC_COMMIT checkout, before configure. The configure step keeps --config-new_macho=yes, so the patch is active for this bundle. The V repo copy of this script (thirdparty/build_scripts/ thirdparty-macos-arm64_tcc.sh) applies the same patch, but with --config-new_macho=no, where it does nothing. Keep the two in sync. This script now needs the V checkout to contain the patch file (vlang/v#31146 or a branch that has it). Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
3 open issues
When the patch file is missing (a known dependency per the PR description), the failure message… · New When the patch file is missing (a known dependency per the PR description), the failure message… · Newgit applywill fail if the patch is already applied (e.g., rerunning the script in an existing… · New
What changed in this PR
Ensures the TinyCC bundle build actually applies the existing Mach-O page_count patch needed to avoid macOS 27 “garbage globals” when chained fixups are enabled.
Changes:
- Capture
V_ROOTbefore enteringtinycc/so patch paths resolve correctly. - Apply
tccmacho-page-count-filesize.diffimmediately after checking outTCC_COMMITand fail fast if it doesn’t apply.
| File | Description |
|---|---|
| build.sh | Stores the V repo root and applies the TinyCC Mach-O page_count patch after checkout to ensure the bundled TCC includes the fix. |
Review effort: Lite
A V checkout without vlang/v#31146 has no patch file, and the failure used to show only as a git apply error. Check the path up front and name the file and the required V change. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Copilot stopped reviewing on behalf of
JalonSolov due to an error
October 26, 2026 22:48
JalonSolov
pushed a commit
that referenced
this pull request
Oct 27, 2026
#110 changed build.sh, so the recipe.sha256 in the macOS arm64 bundle manifest no longer matched the committed file. The staged preflight rejected the manifest with "declared SHA-256 differs from the immutable candidate blob", which fails the baseline contract probe in CI. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
4 of 5 tasks
medvednikov
added a commit
that referenced
this pull request
Nov 19, 2026
…OLDER=thirdparty/tcc bash thirdparty/build_scripts/thirdparty-macos-arm64_tcc.sh` (#120) Rebuild the macOS arm64 bundle at TinyCC mob 0f004a08. The previous tcc.exe was the 2026-07-28 build of 85ba3ae8; the recipe changes since then (#109/#110 tccmacho patch, #118 --config-new_macho=no) were never applied to a published binary. 0f004a08 contains 70adbb12 (arm64: fix sp offsets of 4096 and more in arm64_spoff). With the old tcc.exe, tests2/153_large_struct_args.c segfaults; with this one it matches its .expect. update_tccbin.yml cannot publish this managed bundle (the recipe refuses non-deferred builds, and monthly candidate composition needs a producer toolchain observation the base manifest does not have). So this was built by hand with vlang/v master f56fcbbaaa's recipe in deferred mode (TCCBIN_DEFER_COMMIT=1), MACOSX_DEPLOYMENT_TARGET=11.0 (minos 11.0, as before), Apple clang 21 on macOS 27.2 arm64. The libgc files, README.md, build.sh and patches are unchanged. automation/bundle-manifest.json: inventory/outputs sha256 updated for the rebuilt files, and lib/bcheck_run.o (new in this TinyCC) added. Policy fields (recipe, sources, probes, contract) are unchanged. Checked locally: tccbin_tests (hello, gc_alloc, crash) pass with libgc.dylib; V master builds itself with -cc tcc for two generations; `v -cc tcc test` over builtin, strings, os, math, time, sync, x/json2, regex, encoding: 451 passed, 0 failed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
patches/tccmacho-page-count-filesize.diffbut nothing applied it. The bundle built from TCC 85ba3ae8 is unchanged, so the macOS 27 garbage-globals bug (macOS 27 arm64: bundled TCC links binaries with garbage in __bss (v up hangs, make panics) v#29744) is still present.TCC_COMMITcheckout, before configure.--config-new_macho=yes, so the patch is active for this bundle.Dependency
The apply reads
thirdparty/build_scripts/patches/tccmacho-page-count-filesize.difffrom the V checkout the script runs in. That file lands with vlang/v#31146. Build from a V checkout that has it.Keep in sync
The V repo script applies the same patch, but with
--config-new_macho=no, where it is inert. Thisbuild.shis a recorded copy of that script, and this change edits the copy. Both must carry the same apply step, or the next rebuild from the V script drops it.Verified
bash -n build.shpasses.git apply --checkpasses against TinyCC 85ba3ae8 (the commit this bundle pins), and the patched file has the threefixup_page_countreferences.Not verified
🤖 Generated with Claude Code